// Locate the hightest number in an array
// By DreamVB 18:38 07/10/2016

#include <iostream>

using namespace std;
using std::cout;
using std::endl;

void ShowArrayContents(int *data, int size){
	int i = 0;
	while (i < size){
		if (i < size - 1){
			cout << data[i] << ", ";
		}
		i++;
	}
	cout << data[i - 1] << endl;
}

int main(int argc, char *argv[]){
	int items[6] = { 25, 63, 680, 360, 125, 6 };
	int size = sizeof(items) / sizeof(*items);

	int i = 0;
	int max = 0;
	cout << "Array to check : ";
	ShowArrayContents(items, size);
	cout << endl;

	for (i = 0; i < size; i++){
		//Look for max item
		if (items[i] > max){
			//Set the highest found.
			max = items[i];
		}
	}

	cout << "Arrays max item is : " << max << endl;

	system("pause");
	return 0;
}